package com.tmptSource.service.impl;

import com.tmpt.dto.Result;
import com.tmpt.service.impl.DataLimitService;
import com.tmpt.utils.DateTool;
import com.tmptSource.bean.A2user;
import com.tmptSource.bean.OwSignin;
import com.tmptSource.bean.OwTmpDisplay;
import com.tmptSource.bean.OwUserTrack;
import com.tmptSource.dto.A2userDto;
import com.tmptSource.dto.OwTmpDisplayDto;
import com.tmptSource.dto.OwUserTrackDto;
import com.tmptSource.dto.PageDto;
import com.tmptSource.mapper.A2userMapper;
import com.tmptSource.mapper.OwTmpDisplayMapper;
import com.tmptSource.mapper.OwUserTrackMapper;
import com.tmptSource.service.intf.IOw4HWService;
import com.tmptSource.service.intf.IOwTmpDisplayService;
import com.tmptSource.utils.dozer.MyMapper;
import com.tmptSource.utils.page.MyPageUtils;
import org.apache.log4j.Logger;
import org.dozer.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by wxy on 2016/7/28.
 */
@Service(value="ow4HWService")
@Transactional(propagation = Propagation.REQUIRED)
public class Ow4HWService implements IOw4HWService {

    private Logger log = Logger.getLogger(this.getClass());
    @Autowired private DataLimitService dataLimitService;
    @Autowired private Mapper mapper;
    @Autowired private MyMapper myMapper;
    @Autowired private MyPageUtils myPageUtils;
    @Autowired
    private A2userMapper a2userMapper;
    @Autowired
    private OwUserTrackMapper owUserTrackMapper;


    @Override
    public Result<A2userDto> paginationUser(A2userDto a2userDto,PageDto pageDto) {
        //分页查询
        Result<A2userDto> result = myPageUtils.pagination(
                a2userDto,pageDto,
                A2user.class,
                A2userDto.class,
                a2userMapper,
                false,null);


        return result;
    }




    @Override
    public Result<OwUserTrackDto> paginationTrack(OwUserTrackDto owUserTrackDto, PageDto pageDto) {
        //分页查询
        Result<OwUserTrackDto> result = myPageUtils.pagination(
                owUserTrackDto,pageDto,
                OwUserTrack.class,
                OwUserTrackDto.class,
                owUserTrackMapper,
                false,null);

        return result;
    }




}
